void updateSelectedFilters(
  Map<String, List<String>> selectedFilters,
  List<Map<String, dynamic>> filterData,
  Map<String, dynamic>? result,
) {
  if (result == null) {
    // 清空
    for (final item in filterData) {
      selectedFilters[item['prop'] as String] = [];
    }
  } else {
    for (final item in filterData) {
      final prop = item['prop'] as String;
      final val = result[prop];
      if (val is List) {
        selectedFilters[prop] = val.map((e) => e.toString()).toList();
      } else if (val == null) {
        selectedFilters[prop] = [];
      } else {
        selectedFilters[prop] = [val.toString()];
      }
    }
  }
}
